package com.hgy.crowd.mapper;

import com.hgy.crowd.entity.Role;
import com.hgy.crowd.entity.RoleExample;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface RoleMapper {
    int countByExample(RoleExample example);

    int deleteByExample(RoleExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    List<Role> selectByExample(RoleExample example);

    Role selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByExample(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    List<Role> selectRoleByKeyword(String keyword);

    List<Role> selectAssignedRole(Integer id);

    List<Role> selectUnAssignedRole(Integer id);

    void saveAuthByRoleId(@Param("roleId") Integer roleId,@Param("authIdList") List<Integer> authIdList);

    void deleteOldAuthByRoleId(Integer id);
}